using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;
using Managistics.Model; 

namespace Managistics.Model.Mappings {
    
    
    public class CityMap : ClassMap<City> {
        
        public CityMap() {
			Table("CITY");
			LazyLoad();
			Id(x => x.Cityid).GeneratedBy.Assigned().Column("CITYID");
			References(x => x.Country).Column("COUNTRYID");
			Map(x => x.Cityname).Column("CITYNAME").Not.Nullable().Length(30);
			HasMany(x => x.Customers).KeyColumn("CITYID");
			HasMany(x => x.Employees).KeyColumn("CITYID");
        }
    }
}
